<?php

use Illuminate\Database\Seeder;

class WarningSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        \App\Warning::truncate();

        for ($i=0; $i < 10; $i++) {
            $product = \App\Product::inRandomOrder()->first();
            factory('App\Warning')->create(['product_id' => $product]);
        }
    }
}
